<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		div p:nth-of-type(4) {
			color: red;
		}

		div p:nth-of-type(odd) {
			color: green;
		}
	</style>
</head>
<body>
	<div>
		<p>这是nth-of-type的测试1</p>
		<p>这是nth-of-type的测试2</p>
		<p>这是nth-of-type的测试3</p>
		<h4>这是标题1</h4>
		<p>这是nth-of-type的测试4</p>
		<p>这是nth-of-type的测试5</p>
		<p>这是nth-of-type的测试6</p>
		<p>这是nth-of-type的测试7</p>
		<p>这是nth-of-type的测试8</p>
		<p>这是nth-of-type的测试9</p>
		<p>这是nth-of-type的测试10</p>
	</div>
</body>
</html>